package com.aiwei.tdjk.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * Created by yanfeng on 2016/12/22
 */
@NoArgsConstructor
@AllArgsConstructor
public enum SaleOrderStatusEnum {
    notBooking(1,"未订舱/未制单"), booked(2,"已订舱/已制单"),confirmed(3,"仓库确认"),refused(4,"仓库撤回");

    @Getter
    private Integer code;
    @Getter
    private String info;


    public static SaleOrderStatusEnum getValue(Integer code) {
        final SaleOrderStatusEnum[] values = SaleOrderStatusEnum.values();
        for (SaleOrderStatusEnum value : values) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
}
